<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>个人主页</title>
    <base href="<?php echo base_url(); ?>"/>
    <link href="style/base.css" rel="stylesheet" type="text/css"/>
    <link href="style/common.css" rel="stylesheet" type="text/css"/>
    <link href="style/zhanshi.css" rel="stylesheet" type="text/css"/>
    <link href="style/my.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="js/Common.js"></script>
    <script type="text/javascript" src="js/Validation.js"></script>
    <script type="text/javascript" src="jscript/WdatePicker.js"></script>
    <script type="text/javascript" src="js/jquery.form.js"></script>
    <script type="text/javascript" src="js/jquery.blockUI.js"></script>
    <script type="text/javascript" src="js/jquery.enplaceholder.js"></script>
    <script src="js/organictabs.jquery.js"></script>
    <!--[if IE 6]>
    <script type="text/javascript" language="javascript" src="js/ie6/DD_belatedPNG_0.0.8a-min.js"></script>
    <script type="text/javascript" language="javascript">
        DD_belatedPNG.fix('.logo img,.footer_logo img');
    </script>
    <![endif]-->
    <script type="text/javascript" language="javascript">
        // 文本框placeholder效果,给input加上类ph,使其支持placeholder效果
        $(function () {
            $('input.ph').placeholder({isUseSpan: true});
            $('#btnEmail').bind('click',sendMail);
        })
        // 点赞按钮
        $(function () {
            $("#zan").click(
                function () {
                    if ($(this).hasClass("zan_has")) {
                        $(this).removeClass("zan_has");
                        //$(this).text("支持");
                    } else {
                        $(this).addClass("zan_has");
                        //$(this).text("已支持");
                    }

                })
        })
        // 登陆条固定效果
        $(function () {
            if ($("#login_zc").length > 0 && ($("#login_zc").css("display") != "none")) {
                $("body").css("padding-bottom", "135px");
            }

            $("#login_close").click(function () {
                $("#login_zc").hide();
                $("body").css("padding-bottom", "0");
            })
        })

        $(function () {
            //$(".mingpian_xiangce table").attr("class","tableshow");
            var lenA = $("#liA").height();
            var lenC = $("#liC").height();
            var lenM1 = lenA > lenC ? lenA : lenC;
            $("#liA,#liC").height(lenM1);


            var lenT = $("#liT").height();
            var lenR = $("#liR").height();
            var lenM2 = lenT > lenR ? lenT : lenR;


            $("#liT,#liR").height(lenM2);

            $("#divArea").height(lenM1 + lenM2 + 120);
        });
        //打印
        function myPrint(obj) {
            var newWindow = window.open("打印窗口", "_blank");
            var docStr = obj.innerHTML;
            newWindow.document.write(docStr);
            newWindow.document.close();
            newWindow.print();
            newWindow.close();
        }

        function sendMail()
        {
            var email = $('#email').val();
            var myEmail = $('#myEmail').val();
            var emailTitle = $('#emailTitle').val();
            var hiddenId = $('#hiddenId').val();
            var myreg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
            if(IsEmpty(email) || !myreg.test(email)){
                $('#email').css("border","1px solid red");
                return false;
            }else{
                $('#email').css("border","1px solid  #0096FF");
            }

            if(IsEmpty(myEmail) || !myreg.test(myEmail)){
                $('#myEmail').css("border","1px solid red");
                return false;
            }else{
                $('#myEmail').css("border","1px solid  #0096FF");
            }

            if(IsEmpty(emailTitle)){
                $('#emailTitle').css("border","1px solid red");
                return false;
            }else{
                $('#emailTitle').css("border","1px solid  #0096FF");
            }

            paser = {email:email,myEmail:myEmail,emailTitle:emailTitle,id:hiddenId}
            $.ajax({
                url:'index.php/login/sendHtmlMail',
                type:'post',
                dataType:'json',
                data:paser,
                success:function(data){

                }
            })
        }
    </script>
</head>
<body>
<!-- head S-->
<?php
include 'header.php';
?>
<!-- head E-->
<!-- 名片 S -->
<?php
include 'person_info.php';
?>
<!-- 名片 E -->

<!-- 选项卡 S -->
<?php
include 'home_nav.php';
?>
<!-- 选项卡 E -->

<!-- 模特卡 S -->
<div class="w1100">
    <div class="model_card">
        <!-- 发送 S -->
        <div class="mc_send">
            <div class="l">
                <div class="form_item">
                    <input type="hidden" value="<?php if(isset($_GET['id'])){echo $_GET['id'];}?>" id="hiddenId" />
                    <label>对方邮箱：</label>
                    <input type="text" id="email" class="form_text"/>
                </div>
                <div class="form_item">
                    <label>我的邮箱：</label>
                    <input type="text" class="form_text" id="myEmail"/>
                </div>
                <div class="form_item">
                    <label>邮件标题：</label>
                    <input type="text" class="form_text" id="emailTitle"/>
                </div>
                <div class="clear"></div>
                <span class="fontc01">仅需简单几步，即可将模特卡及模特资料一键发送至指定邮箱！方便快捷！</span>
            </div>
            <div class="r">
                <input type="submit" class="form_btn btn_send" id="btnEmail" value="一键发送"/>
                <span><a href="" class="fontc01">点击查看邮件发送效果</a></span>
            </div>
        </div>
        <!-- 发送 E -->

        <!-- 相册 S -->
        <div class="mc_photo">
            <div class="mc_photo_top">
                <a class="btn_print" href="javascript:;" onclick="myPrint(document.getElementById('cardContent'))">一键打印</a>
                <a class="a fontc01" href="">查看打印须知</a>
            </div>
            <div class="mc_photo_cnt" id="cardContent">
                <?php echo $user['cardcontent']; ?>
       </div>
        </div>
        <!-- 相册 E -->

        <!-- 经历 S -->
        <div class="mc_jingli">
            <div class="mc_jingli_top">
                <div class="print">
                    <a class="a fontc01" href="">查看打印须知</a>
                    <a class="btn_send" href="javascript:;" onclick="myPrint(document.getElementById('madouInfo'))">一键打印</a>
                </div>
                <img src="<?php echo base_url();?>images/logo2.png"/>
                <span>模特编号：<?php echo $user['id']; ?></span>
            </div>
            <div class="mc_jingli_cnt mt_10" id="madouInfo">
                <div class="mc_jingli_tit clearfix">
                    <div class="mp_img">
                        <img src="<?php if (empty($user['headurl'])) print 'images/touxiang_img.jpg'; else print base_url().'uploads/'.$user['headurl']; ?>"/>
                    </div>
                    <div class="mp_cnt">
                        <h3 class="mp_name fontc01"><?php echo $user['realname']; ?></h3>

                        <div class="clear"></div>
                        <div class="mp_age">
                            <span class="fontc01">22岁</span>&nbsp;&nbsp;&nbsp;<?php echo $user['provincename'].'-'.$user['cityname']; ?>
                        </div>
                        <div class="mp_job"><?php echo $user['modeltypename'] ?></div>
                        <ul class="mp_body">
                            <li><span class="fontc01">身高：</span><?php echo $user['high']; ?>cm</li>
                            <li><span class="fontc01">体重：</span><?php echo $user['weight']; ?>kg</li>
                            <li>
                                <span class="fontc01">三围：</span><?php echo $user['chestsize']; ?> / <?php echo $user['waistsize']; ?> / <?php echo $user['buttsize']; ?>
                            </li>
                        </ul>
                    </div>
                    <div class="mp_2wei"><img src="<?php echo base_url();?>images/2wei.jpg"/></div>
                </div>
                <div class="mc_jingli_txt">
                    <h3 class="fontc01">模特培训经历</h3>

                    <p></p><?php echo str_replace("\n", "<br />", $user['trainingexperience']); ?>

                    <h3 class="fontc01">模特活动经历</h3>

                    <p></p><?php echo str_replace("\n", "<br />", $user['activitiexperience']); ?>

                    <h3 class="fontc01">模特比赛经历</h3>

                    <p><?php echo str_replace("\n", "<br />", $user['competitionexperience']); ?></p>

                    <h3 class="fontc01">模特获奖经历</h3>

                    <p><?php echo str_replace("\n", "<br/>", $user['reward']); ?></p>
                </div>
                <div class="mc_jingli_footer fontc01">星探麻豆(xingtanmadou.com) 打造专业模特形象展示平台</div>
            </div>
        </div>
        <!-- 经历 E -->
    </div>
</div>
<!-- 模特卡 E -->

<!-- 登录 S-->
<?php if (!$this->session->userdata['id']) { ?>
    <div class="login_zc login_zc_bg2" id="login_zc">
        <div class="login_zc_inner">
            <div class="form">
                <form action="" method="">
                    <input type="text" class="form_text ph" placeholder="手机号/邮箱" value=""/>
                    <input type="password" class="form_text ph" placeholder="登录密码" value=""/>
                    <input type="submit" class="form_login" value="登 录"/>
                    <a href="" class="btn_regedit">注 册</a>
                </form>
            </div>
            <ul>
                <li class="btn_login_weibo"><a href="#">微博账号登录</a></li>
                <li class="btn_login_qq"><a href="#">QQ账号登录</a></li>
                <li class="txt"><img src="<?php echo base_url();?>images/txt_zcjks.png"/></li>
            </ul>
            <a href="javascript:void(0)" class="btn_close" id="login_close"></a>
        </div>
    </div>
<?php } ?>
<!-- 登录 E-->

<!-- 底部 S -->
<?php include 'footer.php'; ?>
<!-- 底部 E -->
</body>
</html>
